/**
* <p>Title: CacheManager.java</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2009</p>
* <p>Company: xunjie</p>
* @author shenhao
* @date 2010-3-9
* @version 1.0
*/
package cn.haona.game.simb.object.god;

import java.util.Hashtable;

import cn.haona.game.simb.object.god.cache.Cache;
import cn.haona.game.simb.object.god.cache.CacheImpl_Memcached;

/**
 * <p>Title: CacheManager</p>
 * <p>Description: </p>
 * <p>Company: xunjie</p> 
 * @author    shenhao
 * @date       2010-3-9
 */
public class CacheManager implements Manager
{
	//本地缓存
	private Hashtable<String,Object> localCache;
	
	//远端缓存
	private Cache remoteCache;

	/**
	 * 
	 */
	public CacheManager()
	{
		initMe();
	}
	


	/* (non-Javadoc)
	 * <p>Title: getID</p>
	 * <p>Description: </p>
	 * @return
	 * @see cn.haona.game.simb.god.Manager#getID()
	 */

	public String getID()
	{
		// TODO Auto-generated method stub
		return null;
	}

	public void destoryMe()
	{
		// TODO Auto-generated method stub
		
	}

	/**
	 * 初始化自己
	 */
	public void initMe()
	{
		//本地缓存
		localCache=new Hashtable<String, Object>();
	}
	
	public boolean cleanLocalCache()
	{
		localCache.clear();
		return true;
	}
	
	public boolean cleanRemoteCache()
	{
		return remoteCache.cleanAll();
	}



	public Hashtable<String, Object> getLocalCache() {
		return localCache;
	}



	public Cache getRemoteCache() {
		return remoteCache;
	}



	public void setRemoteCache(Cache remoteCache) {
		this.remoteCache = remoteCache;
	}
	

	

}
